/* Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "stdafx.h"
#include "C_粒子插座.h"

using namespace std;


C_粒子插座::C_粒子插座(u16string name) :C_插座基类(name, E_值类型::e_Type_ParticleSystem) {
	m_Value = (S_粒子插座数据*)malloc(sizeof(S_粒子插座数据));
	m_Value->m_Psy = 0;
	m_Value->m_粒子点 = 0;
	m_Value->m_粒子 = new S_粒子;
}

C_粒子插座::~C_粒子插座() {
	delete m_Value->m_粒子;
	free(m_Value);
}

void * C_粒子插座::f_getData(uint8 线程ID) {
	C_插座基类* socket = f_getLinkOutSocket();
	if (socket) {
		if (socket->m_Type == E_值类型::e_Type_ParticleSystem) {
			return dynamic_cast<C_粒子插座*>(socket)->f_getData(线程ID);
		}
	}
	return m_Value;
}

void C_粒子插座::f_setData(void* data, uint8 线程ID) {
	*m_Value = *((S_粒子插座数据*)data);
}






void C_粒子插座::f_读取(FILE* f) {
	C_插座基类::f_读取(f);
}

void C_粒子插座::f_写入(FILE* f) {
	C_插座基类::f_写入(f);
}




















